package com.ym521.simple

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.ym521.freesnack.toToastCenterShort
import com.ym521.simple.databinding.FragmentSimpleBinding

/**
 *@author Ym
 *E-mail: 2435970206@qq.com
 *createTime:2024/4/13
 *explain:
 *
 */
class SimpleFragment : Fragment() {
    var viewBind: FragmentSimpleBinding? = null
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        val viewBind = FragmentSimpleBinding.inflate(layoutInflater, container, false)
        this.viewBind = viewBind
        return viewBind.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        viewBind?.let {
            it.root.setOnClickListener {
                toToastCenterShort("我是在 Fragment 中间FreeSnack")
            }
        }
    }


}